package com.hdax.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author ${author}
 * @since 2021-03-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cus_order")
public class CusOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 客户编号
     */
    @TableField("cus_id")
    private Integer cusId;

    /**
     * 交易车型编号
     */
    @TableField("car_id")
    private Integer carId;

    /**
     * 定金金额
     */
    @TableField("deposit")
    private Float deposit;

    /**
     * 尾款金额
     */
    @TableField("subsequent")
    private Float subsequent;

    /**
     * 定金时间
     */
    @TableField("deposit_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime depositTime;

    /**
     * 尾款时间
     */
    @TableField("subsequent_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime subsequentTime;

    /**
     * 订单状态
     */
    @TableField("order_state")
    private Integer orderState;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField("update_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;

    /**
     * 退订时间
     */
    @TableField("unsubscribe_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime unsubscribeTime;

    /**
     * 创建人编号
     */
    @TableField("create_user_id")
    private Integer createUserId;

    /**
     * 最后修改人编号
     */
    @TableField("update_user_id")
    private Integer updateUserId;


    @TableField(exist = false)
    private Car car;

    @TableField(exist = false)
    private Customer customer;

    @TableField(exist = false)
    private String stringOrderState;


}
